﻿using Model;

namespace BehaviorModel
{
    /// <summary>
    /// Describes Request Pool in QSM.
    /// Entity which accumulates free Requests and gives you access to them.
    /// </summary>
    public interface IRequestPool
    {
        /// <summary>
        /// Gets free Request.
        /// </summary>
        /// <returns>IRequset free Request</returns>
        Request GetFreeRequest();

        /// <summary>
        /// Returns Request to Pool when it has worked out
        /// Set's the Request into 'free' state
        /// </summary>
        /// <param name="request">worked out Request</param>
        void ReturnRequest(Request request);
    }
}
